1. Field of the Invention
The present invention relates to an electronic device and a method, and more particularly, to a portable electronic device with electronic compass and method for calibrating compass.
2. Description of the Prior Art
The advancement of integrated circuit and technology of electro-mechanical integration has led to the multiplicity of electronic products with navigation and positioning functions. In such field, electronic compass provides with what a traditional compass can do for personal portable devices such as car navigators, flying navigation, etc. One example of an electronic compass provides azimuth data, which can be presented by the angle change between the geomagnetic north and the target, as the main guidance. The electronic compass usually has one or more magnetometers, or a magnetic element capable of detecting a magnetic field, for detecting the surrounding geomagnetic field and provides guidance.
Such electronic compass is easy to be affected by the combinational magnetic field, including the geomagnetic field and other magnetic fields, and sometimes needs calibration to exclude any interference by surrounding magnetic field to ensure the ability to detect the geomagnetic field. Generally, those surrounding magnetic fields, such as the condition when the electronic compass is locating in a car, under a pylon, near an electrical facility with magnet, can cause an abnormal magnetic field that is many times in magnitude than the geomagnetic field and because of that, signal overflow occurs in the electronic compass. The electronic compass must widen the range of detection for obtaining a better geomagnetic signal, which also leads to the downgrade of precision. When the abnormal magnetic field vanishes, the electronic compass must first carry out calibration before narrowing the range of detection for high geomagnetic precision. The electronic compass may not function during calibration as well.
In many cases, such abnormal magnetic field is usually temporal and causes no effect to the electronic compass being away from a certain distance. Calibration for the electronic compass becomes needless under such condition. In the prior art, calibration for the electronic compass is determined to activate or not by checking the time of existence of the abnormal magnetic field. The electronic compass determines an abnormal magnetic field as temporal interference and ignores the calibration if the abnormal magnetic field vanishes after a predetermined time; otherwise, the calibration will be executed. Such solution often has limitation due to different situations. Additionally, for portable electronic devices that have navigating function such as personal digital assistant (PDA), mobile phone, smart phone, or global positioning system (GPS) device, more and more magnetic accessories such as the stylus are detachably configured at the portable electronic devices for convenience reason. High frequency pull-and-insert movement of such accessories on the portable electronic device, however, generates frequent abnormal magnetic field around. Calibration for electronic compass in such case is needed quite often.